import { createRouter, createWebHistory } from 'vue-router'
import IndexView from '@/views/index/index.vue'
import DeptView from '@/views/dept/index.vue'
import ClazzView from '@/views/clazz/index.vue'
import EmpView from '@/views/emp/index.vue'
import LogView from '@/views/log/index.vue'
import StudentReportView from '@/views/report/studentReport.vue'
import EmpReportView from '@/views/report/empReport.vue'
import StudentView from '@/views/student/index.vue'
import LoginView from '@/views/login/index.vue'
import Layout from '@/views/layout/index.vue';

const routes=[ {
  path: '/',
  component: Layout,
  redirect: '/index',
  children:[    
    {path: '/dept',name: 'dept',component: DeptView},
    {path: '/clazz',name: 'clazz',component: ClazzView},
    {path: '/index',name: 'index',component: IndexView},
    {path: '/emp',name: 'emp',component: EmpView},
    {path: '/log',name: 'log',component: LogView},
    {path: '/student',name: 'student',component: StudentView},
    {path: '/empReport',name: 'empReport',component: EmpReportView},
    {path: '/studentReport',name: 'studentReport',component: StudentReportView},]
},  {path: '/login',name: 'login',component: LoginView}]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes,
})

export default router
